package com.xusheng.cli.entity.rechargeModule;

import com.baomidou.mybatisplus.annotation.*;
import com.xusheng.cli.common.base.BaseEntity;
import com.xusheng.cli.common.validation.Update;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 充值订单实体类
 *
 * @author 王鹤然
 * @since 2022-11-22 13:00:02
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("recharge")
public class RechargeOrder extends BaseEntity {
    @NotNull(message = "id不能为空", groups = Update.class)
    @OrderBy
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * id前缀
     */
    private String idPrefix;
    /**
     * 会员id
     */
    private Long playerId;
    /**
     * 订单号
     */
    private String orderNumber;
    /**
     * 会员账号
     */
    private String playerAccount;
    /**
     * 支付方式（1：微信  2：支付宝）
     */
    private Integer payMode;
    /**
     * 充值金额
     */
    private BigDecimal rechargeAmount;
    /**
     * 联系方式qq
     */
    private String qq;
    /**
     * 二维码
     */
    private String qrCode;
    /**
     * 支付信息 0：未支付 1：已支付
     */
    private Boolean payInfo;
    /**
     * 用户id
     */
    private Long userId;
    /**
     * 支付时间
     */
    private LocalDateTime payTime;
    
    @TableField(exist = false)
    private String rechargeAmountSearch;

}

